//
//  TCAirportCell.m
//  EFBTerminalCharts
//
//  Created by xiu-imac on 13-11-13.
//  Copyright (c) 2013年 adcc. All rights reserved.
//

#import "TCAirportCell.h"

@implementation TCAirportCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
		[self setFrame:CGRectMake(0, 0, 350, 60)];
        _icaoLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 10, 200, 20)];
		_nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 30, 200, 20)];
		
		[_icaoLabel setTextColor:[UIColor blackColor]];
		[_nameLabel setTextColor:[UIColor blackColor]];
		
		[_icaoLabel setFont:[UIFont systemFontOfSize:21]];
		[_nameLabel setFont:[UIFont systemFontOfSize:14]];
		
//		UIView *selectedView = [[[UIView alloc]initWithFrame:self.frame] autorelease];
//		[selectedView setBackgroundColor:[UIColor colorWithRed:0x8b/255.0 green:0xea/255.0 blue:0xce/255.0 alpha:1.0]];
//		[self setSelectedBackgroundView:selectedView];
		
        self.backgroundColor = [UIColor whiteColor];
		[self addSubview:_icaoLabel];
		[self addSubview:_nameLabel];
		[self setFrame:CGRectMake(0, 0, 350, 60)];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];
//	if (selected) {
//		[_icaoLabel setTextColor:[UIColor blackColor]];
//		[_nameLabel setTextColor:[UIColor darkGrayColor]];
//	}
//	else
//	{
//		[_icaoLabel setTextColor:[UIColor whiteColor]];
//		[_nameLabel setTextColor:[UIColor lightGrayColor]];
//	}
}

- (void)dealloc
{
    [_icaoLabel release];
    [_nameLabel release];
    [super dealloc];
}
@end
